@foreach($categories as $category)
    @if($parentId === $category->id)
         <option value="{{ $category->id }}" selected="selected">{{ str_repeat('-', $level) }} {{ $category->name }}</option>
    @else
        <option value="{{ $category->id }}">{{ str_repeat('-', $level) }} {{ $category->name }}</option>
    @endif
    @if($category->children()->count() > 0)
        @include('admin.site.category.category-edit', ['categories' => $category->children, 'level' => ++$level,'parentId' => $editTarget->parent_id])
    @endif
@endforeach